package com.itheima.reggie.common;


/**
 * 基于ThreadLocal封装工具类，用户保存和获取当前登录用户id
 */
public class BaseContext {

    protected BaseContext() {
    }

    public static ThreadLocal<Long> thread =new ThreadLocal<Long>();

    public static void setCurrentId(Long id) {
        thread.set(id);
    }

    public static Long getCurrentId() {
       return thread.get();
    }
}
